package com.example.practise.service.impl;

import com.example.practise.mapper.StudentMapper;
import com.example.practise.request.StudentRequest;
import com.example.practise.response.APIRespVo;
import com.example.practise.response.Student.StudentRespVo;
import com.example.practise.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("student")
public class StudentServiceImpl implements IStudentService {

    @Autowired
    private StudentMapper studentMapper;
    @Override
    public APIRespVo<List<StudentRespVo>> qryList() {
        APIRespVo<List<StudentRespVo>> res = new APIRespVo<>();
        List<StudentRespVo> list = null;
        try {
            list = studentMapper.qryList();
        } catch (Exception e) {
            res.setMsg(e.getMessage());
        }
        res.setData(list);
        return res;
    }
}
